<?php $this->_extends('_layouts/main_layout'); ?>
<?php $this->_block('title'); ?>
	Landing Urls
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>
<div id="content" class="box">
	<h1>Landing Urls</h1>
	<div id="menu" class="box">
		<ul class="box">
			<li><a href="<?php echo url('landingurl/add');?>"><span>Add</span></a></li>
		</ul>
	</div>
		<?php if (isset($infos)) 
				{
					foreach ($infos as $info)
					{
		?>
				<p class="msg info"><?php echo $info;?></p>
		<?php		}
				}
		?>
	<table class="full-size">
		<tbody>
			<tr>
				<th>ID</th>
				<th>URL</th>
				<th>Action</th>
			</tr>
			<?php
				if(!empty($landingUrls)):
					$bg = false;
					foreach ($landingUrls as $landingUrl)
					{
			?>
					<tr <?php if ($bg) echo 'class="bg"';?>>
						<td><?php echo $landingUrl['id'];?></td>
						<td><a href="<?php echo $landingUrl['url'];?>" target="_blank"><?php echo $landingUrl['url'];?></a></td>
						<td>
						<a href="<?php echo url('landingurl/edit', array('id'=>$landingUrl['id']));?>">Edit</a>
						</td>
					</tr>
			<?php
					$bg = !$bg;
					}
				endif;
			?>
		</tbody>
	</table>
</div>
<?php $this->_endblock(); ?>